<?php
class Settings
{
	public function construct()
	{
		
	}
	
	public function index()
	{
		CommonFunc::loadFile(SMARTYLIBS . "Smarty.class.php");
		$smarty = new Smarty();		
		$smarty->assign("title", "Settings");
		$smarty->display('settings/index.tpl');
	}

	public function connectSAPServer()
	{
		CommonFunc::loadFile("CONN.dbo");
		$clsSAPConn = new SAPDBConn();
		$clsSAPConn->SAPConn();
	}
	
	public function loadBackupFiles()
	{
		CommonFunc::loadFile("model/Settings.php");
		$modSettings = new ModelSettings();
		$modSettings->loadBackupFiles();
	}
	
	public function processBackup()
	{
		CommonFunc::loadFile("model/Settings.php");
		$modSettings = new ModelSettings();
		$request = CommonFunc::getRequest();
		$filename = $request['filename'];
		$modSettings->processBackup($filename);
	}
	
	public function importRates()
	{
		CommonFunc::loadFile("model/Settings.php");
		$modSettings = new ModelSettings();
		$modSettings->importRateBkFile();
	}
	
	public function importRates2()
	{
		CommonFunc::loadFile("model/Settings.php");
		$modSettings = new ModelSettings();
		$modSettings->importRates2();
	}
}	
?>